package com.bilin.coin.bean;

import com.sunfusheng.marqueeview.IMarqueeItem;

import java.util.List;

public class AnnoBean {


    /**
     * total : 1
     * records : [{"id":5,"title":"公告","content":"<p>尊敬的旌辰会员！<\/p><p>您好，三维挖矿系统正在努力开发，尊请期待！<\/p><p>注册好后请及时进行实名认证。 <\/p><p>                     祝您生活愉快！<\/p>","createTime":"2020/05/30 11:20:41","updateTime":"2020/05/30 11:20:41","version":0}]
     */

    private int total;
    private List<RecordsBean> records;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<RecordsBean> getRecords() {
        return records;
    }

    public void setRecords(List<RecordsBean> records) {
        this.records = records;
    }

    public static class RecordsBean implements IMarqueeItem {
        /**
         * id : 5
         * title : 公告
         * content : <p>尊敬的旌辰会员！</p><p>您好，三维挖矿系统正在努力开发，尊请期待！</p><p>注册好后请及时进行实名认证。 </p><p>                     祝您生活愉快！</p>
         * createTime : 2020/05/30 11:20:41
         * updateTime : 2020/05/30 11:20:41
         * version : 0
         */

        private int id;
        private String title;
        private String content;
        private String createTime;
        private String updateTime;
        private int version;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(String updateTime) {
            this.updateTime = updateTime;
        }

        public int getVersion() {
            return version;
        }

        public void setVersion(int version) {
            this.version = version;
        }

        @Override
        public CharSequence marqueeMessage() {
            if (title.length()>15) {
                return title.substring(0,12) +"...";
            }
            return title;
        }
    }
}
